﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PresentList.aspx.cs" Inherits="Web.PresentList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    
    <ext:ResourceManager ID="ResourceManager1" runat="server" />

    
    <ext:Window ID="wContent" runat="server" Resizable="false" Width="350" Height="465">
        <Items>
            <ext:FormPanel        
                    runat="server"
                    Title="接待申请"
                    LabelWidth="110"
                    Width="350"
                    Height="445"
                    Icon="User"
                    Padding="5"
                    Layout="Form" ID="ctl330"            
                    >
                    <Items>
                        <ext:TextField FieldLabel="申请人" ID="tApplicant" runat="server" ReadOnly="true" />
                        <ext:DropDownField FieldLabel="审批人" ID="tApprover" runat="server" ReadOnly="true" />   
                        <ext:TextField FieldLabel="经费处理人员" ID="tGA" runat="server" ReadOnly="true" />
                        <ext:TextField FieldLabel="状态" ID="tStatus" runat="server" />
                        <ext:Button FieldLabel="检查表" id="bChecklist" Text="详细" runat="server" >
                            <DirectEvents>
                                <Click OnEvent="CheckList_Click" />
                            </DirectEvents>
                        </ext:Button>
                        <ext:DateField FieldLabel="执行日期" ID="dExcuteDate" runat="server" />
                        <ext:TextField FieldLabel="对方" ID="tOpposite" runat="server" />
                        <ext:TextField FieldLabel="馈赠" ID="tPresent" runat="server" />
                        <ext:TextField FieldLabel="实际报销费用" ID="tActualFee" runat="server" />
                        <ext:TextField FieldLabel="总人数" ID="tNumOfPerson" runat="server" />
                        <ext:TextField FieldLabel="总金额" ID="tTotalAmount" runat="server" />
                        <ext:TextArea FieldLabel="备注" ID="tRemarks" runat="server" />
                        <ext:Panel ID="Panel1" runat="server" Border="false">
                        <Items>
                        <ext:ColumnLayout ID="ColumnLayout1" runat="server">
                            <Columns>
                                <ext:LayoutColumn ColumnWidth="0.333">
                                    <ext:Button Text="保存" runat="server" ID="btnSave" >
                                        <DirectEvents>
                                            <Click OnEvent="Save_Click" />
                                        </DirectEvents>
                                    </ext:Button>
                                </ext:LayoutColumn>
                                <ext:LayoutColumn ColumnWidth="0.333">
                                    <ext:Button Text="提交" runat="server" ID="btnSubmit" >
                                        <DirectEvents>
                                            <Click OnEvent="Submit_Click" />
                                        </DirectEvents>
                                    </ext:Button>
                                </ext:LayoutColumn>
                                <ext:LayoutColumn ColumnWidth="0.333">
                                    <ext:Button Text="退回" runat="server" ID="btnBack" >
                                        <DirectEvents>
                                            <Click OnEvent="Back_Click" />
                                        </DirectEvents>
                                    </ext:Button>
                                </ext:LayoutColumn>
                            </Columns>
                        </ext:ColumnLayout>
                        </Items>
                        </ext:Panel>
                    </Items>            
             </ext:FormPanel>
        </Items>
    </ext:Window>

    <ext:Viewport ID="Viewport1" runat="server">
    <Items>
        <ext:GridPanel 
            ID="gpData" 
            runat="server"
            AutoExpandColumn ="ID"
            Height="1000"
            >
            <Store>
                <ext:Store ID="Store1" runat="server">
                    <Reader>
                        <ext:JsonReader IDProperty="ID" >                
                            <Fields>
                                <ext:RecordField Name="ID" Type="Int" />
                                <ext:RecordField Name="UserName" Type="String" />
                                <ext:RecordField Name="TypeCName" Type="String" />
                                <ext:RecordField Name="ExcuteDate" Type="Date" />
                                <ext:RecordField Name="Opposite" Type="String" />
                                <ext:RecordField Name="Status" Type="String" />
                            </Fields>
                        </ext:JsonReader>
                    </Reader>                    
                </ext:Store>            
            </Store>
            <ColumnModel ID="ColumnModel1" runat="server" >
                <Columns>
                    <ext:Column Header="ID" Width="10" DataIndex="ID" />
                    <ext:Column Header="用户名" Width="150" DataIndex="UserName" />
                    <ext:Column Header="类型" Width="150" DataIndex="TypeCName" />
                    <ext:DateColumn Header="执行日期" Width="150" DataIndex="ExcuteDate" Format="yyyy-MM-dd" />
                    <ext:Column Header="对方" Width="150" DataIndex="Opposite" />
                    <ext:Column Header="状态" Width="150" DataIndex="Status" />
                </Columns>
            </ColumnModel>
            <SelectionModel>
               <ext:RowSelectionModel ID="RowSelectionModel1" runat="server">                    
               </ext:RowSelectionModel> 
            </SelectionModel>  
            <TopBar>
                <ext:Toolbar ID="Toolbar1" runat="server">
                    <Items>
                        <ext:Button runat="server" Text="新增" ID="btnAdd" Icon="NoteAdd">
                            <DirectEvents>
                                <Click OnEvent="Add_Click" />
                            </DirectEvents>
                        </ext:Button>
                        <ext:Button runat="server" Text="修改" ID="btnEdit" Icon="NoteEdit">
                            <DirectEvents>
                                <Click OnEvent="Edit_Click" />
                            </DirectEvents>
                        </ext:Button>
                        <ext:Button runat="server" Text="取消" ID="btnCancel" Icon="NoteDelete">
                            <DirectEvents>
                                <Click OnEvent="Cancel_Click" />
                            </DirectEvents>
                        </ext:Button>
                    </Items>
                </ext:Toolbar>
            </TopBar>
        </ext:GridPanel>
    
    </Items>
    </ext:Viewport>

    <ext:Window ID="wChecklist" runat="server" Hidden="true" />
    </form>
</body>
</html>
